home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 20 / Cream of the Crop 20 (Terry Blount) (1996).iso / program / kh_gdi.zip / KH_GDI / ABS_GRAF.H next >
C/C++ Source or Header  |  1996-05-30  |  1KB  |  41 lines

  1. #ifndef __ABSTRACT_GRAFICS_H_
  2. #define __ABSTRACT_GRAFICS_H_
  3.  
  4. /*  Struct contains empty shablons of functions. We could derivate classes
  5.     from it not thinking about concrete graphics library we shell use.
  6.      It provide common code for any DOS, Windows and so on libraries, if
  7.      them include the same functions.
  8.      This set is only part of Paint class's functions set, described in
  9.      PAINT.H. But one of A.G. struct childs - BGI_Font class, does not need
  10.      Paint class power, so I broke it to two:
  11.  
  12.      AbstractGraphics ────────- BGI_Font ───── Paint
  13.  
  14. */
  15.  
  16. #include "general\kh_error.h"
  17. #include "general\simple.h"
  18.  
  19. // BGI_FONT.CPP contain remarked main() function. To run it remark this code
  20. // and unremark following code marked "Demo"
  21. struct _export AbstractGraphics
  22.      {
  23.      virtual void moveto(int x, int y) {}
  24.      virtual void lineto(int x, int y) {}
  25.      virtual void fillpoly(int numpoints, int* polypoints) {}
  26.      };
  27.  
  28. ///////////////////////////////// D E M O ///////////////////////////////
  29. /*
  30. #include <graphics.h>
  31. struct AbstractGraphics
  32.      {
  33.      virtual void moveto(int x, int y) { ::moveto(x, y); }
  34.      virtual void lineto(int x, int y) { ::lineto(x, y); }
  35.      virtual void fillpoly(int numpoints, int* polypoints)
  36.     { ::fillpoly(numpoints, polypoints); }
  37.      };
  38. */
  39. #endif __ABSTRACT_GRAFICS_H_
  40.  
  41.